package com.mwh.yuantu.dao;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mwh.yuantu.dao.mapper.ChannelInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mwh.yuantu.entity.ChannelInfoEntity;

/**
 * (ChannelInfo)表数据库访问层
 *
 * @author maweihong
 * @since 2023-11-01 09:47:29
 */
@Service
public class ChannelInfoDao extends ServiceImpl<ChannelInfoMapper , ChannelInfoEntity> {

    @Autowired
	private ChannelInfoMapper channelInfoMapper;

    /**
     * 插入新的频道栏目
     * @param channelInfo
     * @return
     */
    public int insert(ChannelInfoEntity channelInfo) {
        return channelInfoMapper.insert(channelInfo);
    }

    /**
     * 更新频道栏目
     * @param channelInfo
     * @return
     */
    public int update(ChannelInfoEntity channelInfo) {
        return channelInfoMapper.update(channelInfo);
    }

    /**
     * 根据主键查询频道信息
     * @param id
     * @return
     */
    public ChannelInfoEntity selectById(String id) {
        return channelInfoMapper.selectById(id);
    }

    /**
     * 删除频道
     * @param id
     * @return
     */
    public int delete(String id) {
        return channelInfoMapper.delete(id);
    }

}

